Skip to content

fix(langgraph): merge callbacks in ensure_config instead of overwriting#7424

Open
ccurme (ccurme) wants to merge 3 commits intomainfrom
cc/stream_mode_events
Open

fix(langgraph): merge callbacks in ensure_config instead of overwriting#7424
ccurme (ccurme) wants to merge 3 commits intomainfrom
cc/stream_mode_events

Conversation

@ccurme
Copy link
Copy Markdown
Contributor

@ccurme ccurme (ccurme) commented Apr 6, 2026

ensure_config used last-write-wins for the callbacks key, which caused callbacks set via .with_config() to be silently dropped when a later config also contained callbacks. This affected astream_events (and therefore stream_mode="events", which injects its own internal callback handler), overwriting any user-provided callbacks on self.config.

Here we update ensure_config to merge callbacks using the same logic as in merge_configs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant